package us.quizgame.quiz;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JTextPane;
import javax.swing.Timer;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import javax.swing.UIManager;
import javax.swing.ImageIcon;

import us.quizgame.Menu;
import us.quizgame.ScoreCard;

import java.awt.Font;

public class NormalQuizGame extends QuizGame
{
	/**
	 * Launch the application.
	 */
	public static void main(String[] args)
	{
		EventQueue.invokeLater(new Runnable()
		{
			public void run()
			{
				try
				{
					QuizGame frame = new NormalQuizGame();
					frame.setVisible(true);
					frame.setLocationRelativeTo(null);
				} catch (Exception e)
				{
					e.printStackTrace();
				}
			}
		});
	}
	
	public NormalQuizGame()
	{
		super();
		gameMode = "normal";
	}
	
	@Override
	protected void checkAnswer(JButton button)
	{
		super.checkAnswer(button);
		//now reset game for next question since we're in normal mode
		resetQuestionTimerStart();
	}
	
	@Override
	protected void endGame()
	{
		if (score < 5)
			playSound(Menu.class.getResource("/us/quizgame/media/Denied.wav"));
		else
			playSound(Menu.class.getResource("/us/quizgame/media/WhickedSick.wav"));
		//ScoreCard scoreCard = new ScoreCard(totalGameTime, score, "normal");
		ScoreCard scoreCard = new ScoreCard(this);
		scoreCard.setVisible(true);
		setVisible(false);
		//dispose();
	}

}
